# CMake 最低版本号要求

#cmake_minimum_required (VERSION 2.8)
cmake_minimum_required(VERSION 3.5)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")

# set(CMAKE_BUILD_TYPE Debug)

# 项目信息

project (SD LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)


set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(BehaviorTreeV3)
include_directories(${BehavoirTreeV3_INCLUDE_DIRS})
find_package(Boost)
find_package(jsoncpp CONFIG REQUIRED)
include_directories(${JSON_INC_PATH})
include_directories(Parameter/include)


# 查找当前目录下的所有源文件

# 并将名称保存到 DIR_SRCS 变量

aux_source_directory(. DIR_SRCS)

# 添加 math 子目录
add_subdirectory(Modules/BTree)
add_subdirectory(Modules/Socket)
add_subdirectory(Parameter)


# 指定生成目标
add_executable(SD main.cpp)
add_definitions(-std=c++14 -O3)


target_link_libraries(SD Parameter)
target_link_libraries(SD BTree)
target_link_libraries(SD Socket)
target_link_libraries(SD BT::behaviortree_cpp_v3 )
target_link_libraries(SD jsoncpp_lib)
set_property(TARGET SD PROPERTY CXX_STANDARD 14)
set (EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/./bin)


